/*
 * @Author: 谢子健 1075010289@qq.com
 * @Date: 2024-07-28 10:18:25
 * @LastEditors: 谢子健 1075010289@qq.com
 * @LastEditTime: 2024-08-05 15:04:11
 * @FilePath: \zhilianilink\src\componets\shuju\ContentMarket.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Col, Row } from 'antd';
import React from 'react';
import ContentCard from './ContentCard';

interface App {
  title: string;
  description: string;
  date: string;
  views: string;
  likes: string;
  comments: number;
  downloads: string;
  shares: string;
  username: string;
  favorites: string;
  tags: string[];
  image: string;
  link: string;
  datasetId: string;
}

interface ContentMarketProps {
  apps: App[]; // 接收的 apps 数据
}

const ContentMarket: React.FC<ContentMarketProps> = ({ apps = [] }) => { // 提供默认值
  return (
    <div className="app-market">
      <Row gutter={[40, 0]}>
        {apps.map((app, index) => (
          <Col key={index} span={12}>
            <ContentCard app={app} />
          </Col>
        ))}
      </Row>
    </div>
  );
};

export default ContentMarket;
